#include<iostream>
#include<cstring>
using namespace std;
const int N = 42;
typedef long long LL;
LL f[N];
int n;
int main()
{
	int t;
	cin >> t;
	f[1] = 1;
	f[2] = 1;
	for (int i = 3; i < N; i++) {
		f[i] = f[i - 1] + f[i - 2];
	}
	while (t--) {
		cin >> n;
		cout << f[n] << endl;
	}
	return 0;
}